import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/ams/purchaseorder/` + url, ...arg)

/**
 * ams_purchase_orderApi接口管理器
 *
 * @author 刘志刚
 * @date  2024/12/31 10:28
 **/
export default {
	// 获取ams_purchase_order分页
	amsPurchaseOrderPage(data) {
		return request('page', data, 'get')
	},
	// 提交ams_purchase_order表单 edit为true时为编辑，默认为新增
	amsPurchaseOrderSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除ams_purchase_order
	amsPurchaseOrderDelete(data) {
		return request('delete', data)
	},
	// 获取ams_purchase_order详情
	amsPurchaseOrderDetail(data) {
		return request('detail', data, 'get')
	},
	amsPurchaseOrderGetMoney(data) {
		return request('getMoney', data, 'get')
	}
}
